import request from '@/utils/http'

// 获取商品详情
export const getDetail = (id)=>{
  return request({
    url:'/goods',
    params:{
      id
    }
  })
}


/**
 * @description: 获取热销榜单.
 * @param {*} type:1, 24小时, 2: 周热销榜单
 * @returns
 */
export const getHotGoodsAPI = ({id, type, limit=3})=>{
  return request({
    url: '/goods/hot',
    params: {
      id,
      type,
      limit,
    }
  })
}
